﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using TomNet.IMSC.Model.DbModels.Common;
using TomNet.IMSC.Model.DbModels.Finance;

namespace TomNet.IMSC.Web.Models.ApiParams
{
    /// <summary>
    /// 订单中心 金融查询分页
    /// </summary>
    public class PageSearch
    {
        /// <summary>
        /// 页面索引
        /// </summary>
        public int PageIndex { get; set; }
        /// <summary>
        /// 页面大小
        /// </summary>
        public int PageSize { get; set; }
        /// <summary>
        /// 关键字
        /// </summary>
        public string KeyWord { get; set; }
    }
    /// <summary>
    /// 订单中心 金融列表
    /// </summary>
    public class BaseListModel
    {
        /// <summary>
        /// Id
        /// </summary>
        public int Id { get; set; }

        ///// <summary>
        ///// 楼盘名称
        ///// </summary>
        //public string BuildingName { get; set; }

        ///// <summary>
        ///// 原价
        ///// </summary>
        //public string CostPrice { get; set; }
        ///// <summary>
        ///// 底价
        ///// </summary>
        //public string LowPrice { get; set; }

        ///// <summary>
        ///// 面积
        ///// </summary>
        //public string Area { get; set; }

        ///// <summary>
        ///// 能否贷款 0 不可以 1 可以
        ///// </summary>
        //public string IsLoan { get; set; }

        ///// <summary>
        ///// 手续费
        ///// </summary>
        //public string Poundage { get; set; }

        /// <summary>
        /// 经纪人姓名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 经纪人电话
        /// </summary>
        public string UserPhone { get; set; }

        ///// <summary>
        ///// 应得佣金
        ///// </summary>
        //public string TotalAmount { get; set; }
        ///// <summary>
        ///// 税款
        ///// </summary>
        //public string TaxAmount { get; set; }
        ///// <summary>
        ///// 已结佣金
        ///// </summary>
        //public string AchieveAmount { get; set; }
        ///// <summary>
        ///// 未结佣金
        ///// </summary>
        //public string UnAchieveAmount { get; set; }
        ///// <summary>
        ///// 佣金流水状态  1 通过   2 审核中
        ///// </summary>
        //public int BrokerageState { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string FilingTime { get; set; }//报备时间

        //===================================================

        ///// <summary>
        ///// 图片路径
        ///// </summary>
        //public string ImagePath { get; set; }
    }

    [NotMapped]
    public class FinanceRunningListViewModel : BaseListModel
    {
        public string StateName { get; set; }
        public string FinanceType { get; set; }


        /// <summary>
        /// 房主姓名
        /// </summary>
        public string HouseUserName { get; set; }
        /// <summary>
        /// 房主电话
        /// </summary>
        public string HouseUserPhone { get; set; }

        /// <summary>
        /// 客户姓名
        /// </summary>
        public string CustomerUserName { get; set; }
        /// <summary>
        /// 客户电话
        /// </summary>
        public string CustomerUserPhone { get; set; }
        /// <summary>
        /// 办件员
        /// </summary>
        public string TransactStaffName { get; set; }
        /// <summary>
        /// 办件员电话
        /// </summary>
        public string TransactStaffPhone { get; set; }


        /// <summary>
        /// 费用
        /// </summary>
        public string Free { get; set; }

        //===================================================
    }

    //装修流水信息样式表
    public class TimelineModel
    {
        /// <summary>
        /// 模板选择 1 报备+通过 2 报备+未通过 3 带看 4 完成
        /// </summary>
        public int StyleID { get; set; }

        /// <summary>
        /// 模块名
        /// </summary>
        public string ModuleName { get; set; }

        /// <summary>
        /// 模块名颜色 橘黄色=3370FD 绿色=93B219 灰色=B4B4B4 红色=101F4
        /// </summary>
        public string ModuleNameColor { get; set; }

        /// <summary>
        /// 模块图标样式   1 进行中，橘黄色 2 已完成，绿色 3 等待，灰色 4 拒绝，红色
        /// </summary>
        public int ModuleIcon { get; set; }

        /// <summary>
        /// 模块图标颜色  1 进行中，橘黄色 2 已完成，绿色 3 等待，灰色 4 拒绝，红色
        /// </summary>
        public string ModuleIconColor { get; set; }

        //=====================================================

        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 时间
        /// </summary>
        public string OperTime { get; set; }

        /// <summary>
        /// 副标题
        /// </summary>
        public string ViceTitle { get; set; }

        /// <summary>
        /// 副标题颜色 橘黄色=3370FD 绿色=93B219 灰色=B4B4B4 红色=101F4
        /// </summary>
        public string ViceTitleColor { get; set; }

        /// <summary>
        /// 报备审核说明
        /// </summary>
        public string FilingAuditingRemark { get; set; }

        /// <summary>
        /// 照相按钮 0 没有 1 有
        /// </summary>
        public int IsCameraButton { get; set; }

        /// <summary>
        /// 图片类型 1带看单   2成交确认单
        /// </summary>
        public int ImageType { get; set; }

        /// <summary>
        /// 图片说明 0 没有 1 有
        /// </summary>
        public string ImageRemark { get; set; }

        /// <summary>
        /// 图片集合
        /// </summary>
        public List<Images> ImageList { get; set; }

        /// <summary>
        /// 查看按钮 0 没有 1 有
        /// </summary>
        public int IsViewButton { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int SortID { get; set; }
    }

    public class FinanceRunningInfoModel
    {

        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 经纪人姓名
        /// </summary>
        public string UserName { get; set; }
        /// <summary>
        /// 经纪人电话
        /// </summary>
        public string UserPhone { get; set; }

        ///// <summary>
        ///// 签约面积
        ///// </summary>
        //public decimal Area { get; set; }
        ///// <summary>
        ///// 客户地址
        ///// </summary>
        //public string CustomerAddress { get; set; }
        ///// <summary>
        ///// 备注
        ///// </summary>
        //public string Remark { get; set; }

        /// <summary>
        /// 当前状态 1 报备待审 2 报备通过 3 报备驳回 4 已带看 5 已交订金 6 已付首款 7 已备案 8 已完成 9 退房待审 10 已退房
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 流水步骤集合
        /// </summary>
        public List<TimelineModel> TimelineShowList { get; set; }

        /// <summary>
        /// 跟进信息集合
        /// </summary>
        public List<MessageBoardsShowModel> MessageBoardsShowList { get; set; }


        /// <summary>
        /// 应得佣金
        /// </summary>
        public string TotalAmount { get; set; }
        /// <summary>
        /// 税款
        /// </summary>
        public string TaxAmount { get; set; }
        /// <summary>
        /// 已结佣金
        /// </summary>
        public string AchieveAmount { get; set; }
        /// <summary>
        /// 未结佣金
        /// </summary>
        public string UnAchieveAmount { get; set; }
        /// <summary>
        /// 佣金流水状态  1 通过   2 审核中
        /// </summary>
        public int BrokerageState { get; set; }
    }
}